import pandas as pd
import numpy as np
from flask import Flask, render_template

temp = np.random.randint(40, size=100)
days = np.random.randint(7, size=100)
hour = np.random.randint(12, size=100)

data = pd.DataFrame({
    '日期': days.tolist(),
    '时间': hour.tolist(),
    '温度': temp.tolist()
})
datas = data.values.tolist()

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('热力图.html', datas=datas)


if __name__ == '__main__':
    app.run(debug=True)
